#ifndef __LOG_H__
#define __LOG_H__
#include <cstdio>
#include "vec_core.h"
#include "mat4.h"

template <class T, std::size_t Size>
inline void log(const detail::Vec<T, Size>& v, const char* msg = "") {
    printf("%s{ ", msg);
    for (int i = 0; i < Size - 1; ++i) {
        printf("%f, ", v[i]);
    }
    printf("%f }\n", v[Size - 1]);
}

// 按行优先遍历
/*
msg：
    00 01 02 03 
    10 11 12 13
    20 21 22 23
    30 31 32 33
*/
inline void log(const Mat4x4& m, const char* msg = "") {
    printf("%s", msg);
    for (int i = 0; i < Mat4x4::row; ++i) {     // 行
        for (int j = 0; j < Mat4x4::col; ++j) { // 列
            printf("%f ", m(i, j));
        }
        printf("\n");
    }


}

#endif